<?php 
class indexAction extends sfAction{
	private $data = null;
	public function execute($request){
		/*$this->data['pagination']	= array(
				'page'		=> $request->getParameter('page', 1),
				'limit'		=> $request->getParameter('limit', ),
				'page_show'	=> 5
		);*/
		
		$this->data['banners']		= BannersTable::getDataListFrontend(array('rand'=>'1'));
		$this->data['news_top']		= NewsTable::getDataListFrontend(array('sort_order'=>'readmax'),1, 3);
		$this->data['news']			= NewsTable::getDataListFrontend(array('sort_order'=>'readmax','ids_notin' => ArrayHelper::getArrayIds($this->data['news_top'])),1, 12);
		$this->data['news_new']			= NewsTable::getDataListFrontend(null,1, intval(sfConfig::get('app_home_news_list_limit')));
		$this->data['news_total']	= NewsTable::getDataListFrontendCount(null);
		//$pag	= new PaginationHelper($this->data['news_total'], $this->data['pagination']['limit'], $this->data['pagination']['page_show'], $this->data['pagination']['page'], 'news');
		//$this->data['pagination_pager']	= $pag->getPaginations();
		//echo '<pre>';print_r($this->data);echo'</pre>';die;
		$this->setVar('data', $this->data);
	}
}